package com.efounder.form.model;

import com.efounder.builder.base.data.EFDataSet;
import com.efounder.form.DMColComponent;
import com.efounder.form.DataSetComponent;
import com.efounder.form.base.DataComponent;
import com.efounder.form.base.IComponent;

public class Column extends DataComponent implements IComponent, DMColComponent {

    /**
     * 内容
     */
    private String headerText;
    /**
     * 宽度
     */
    private float width;
    /**
     * 文本对其方式
     */
    private String textAlign;
    /**
     * 是否可见
     */
    private boolean visible;
    /**
     * 列对应的组件类型
     **/
    private String componentType;
    /**
     * 数据列名称
     */
    private String dataSetColID;
    /**
     * 是否可编辑
     */
    private boolean editable;

    /**
     * 图片相关--文件名：可以是配置的，可以是从数据中获取的(数据中获取的 > 配置的)  优先级：1
     **/
    private String imageName;
    /**
     * 图片相关--url前缀   优先级：2
     **/
    private String imageUrlPrefix;
    /**
     * 图片相关--默认加载方式  本地：file 网络：http   优先级：3
     **/
    private String defaultImageLoadMode;

    /**
     * FormTextInput 联动的dataSetColIDs,多个dataSetColID用 “;” 分割
     **/
    private String linkedDataSetColIDs;

    /**
     * 精度
     **/
    private int degree = 4;

    /**
     * 单位
     **/
    private String editMask = "吨:吨;升:升;千克:千克";

    /**
     * 默認单位
     **/
    private String initEditMask = "";
    /**
     * 编辑类型 输入框，文本 选择框等
     */
    private String editorType;

    private Boolean isUserInternalDataSetID = false;
    private String numberFormat;
    private String dateFormat;
    private String internalDataSetID;
    private String valueDataSetColID;
    private int numberPrecision;
    private String columnType;
    private String icon;
    private String viewDataSetColID;
    private String viewDataSetID;

    public String getIcon() {
        return icon;
    }

    public Column setIcon(String icon) {
        this.icon = icon;
        return this;
    }

    @Override
    public String getEditorType() {
        return editorType;
    }

    @Override
    public void setEditorType(String editorType) {
        this.editorType = editorType;

    }

    @Override
    public String getDateFormat() {
        return dateFormat;
    }

    @Override
    public void setDateFormat(String dateFormat) {
        this.dateFormat = dateFormat;
    }

    @Override
    public String getFormulaOne() {
        return null;
    }

    @Override
    public void setFormulaOne(String formulaOne) {

    }

    @Override
    public String getEditMask() {
        return null;
    }

    @Override
    public void setEditMask(String editMask) {

    }

    public Column() {
        super();
    }

    public void setLabel(String label) {
    }


    public String getHeaderText() {
        return headerText;
    }

    public void setHeaderText(String headerText) {
        this.headerText = headerText;
    }

    public float getWidth() {
        return width;
    }

    public void setWidth(float width) {
        this.width = width;
    }

    public String getTextAlign() {
        return textAlign;
    }

    public void setTextAlign(String textAlign) {
        this.textAlign = textAlign;
    }

    public boolean isVisible() {
        return visible;
    }

    public void setVisible(boolean visible) {
        this.visible = visible;
    }


    @Override
    public DataSetComponent getDataSetComponent() {
        return null;
    }

    @Override
    public String getDataSetColID() {
        return dataSetColID;
    }

    @Override
    public void setDataSetColID(String dataSetColID) {
        this.dataSetColID = dataSetColID;
    }

    @Override
    public String getDataSetNameColID() {
        return null;
    }

    @Override
    public void setDataSetNameColID(String value) {

    }


    @Override
    public String getInternalDataSetID() {
        return internalDataSetID;
    }

    @Override
    public void setInternalDataSetID(String dataSetID) {
        this.internalDataSetID = dataSetID;
    }

    @Override
    public void setViewDataSetID(String viewDataSetID) {
        this.viewDataSetID = viewDataSetID;
    }

    @Override
    public String getViewDataSetID() {
        return viewDataSetID;
    }


    @Override
    public void setViewDataSetColID(String viewDataSetColID) {
        this.viewDataSetColID = viewDataSetColID;
    }

    @Override
    public String getViewDataSetColID() {
        return viewDataSetColID;
    }

    @Override
    public void setValueDataSetColID(String valueDataSetColID) {
        this.valueDataSetColID = valueDataSetColID;
    }

    @Override
    public String getValueDataSetColID() {
        return valueDataSetColID;
    }


    @Override
    public Boolean getIsUserInternalDataSetID() {
        return isUserInternalDataSetID;
    }

    @Override
    public void setIsUserInternalDataSetID(Boolean isUserInternalDataSetID) {
        this.isUserInternalDataSetID = isUserInternalDataSetID;
    }

    @Override
    public String getIdentifier() {
        return null;
    }

    @Override
    public Object getPropertyMap() {
        return null;
    }

    @Override
    public void setPropertyMap(Object value) {

    }

    @Override
    public Object getProperty(String key, Object defVal) {
        return null;
    }

    @Override
    public void setProperty(String key, Object value) {

    }

    @Override
    public int getNumberPrecision() {
        return numberPrecision;
    }

    @Override
    public void seNumberPrecision(int numberPrecision) {
        this.numberPrecision = numberPrecision;
    }


    @Override
    public String getNumberFormat() {
        return numberFormat;
    }

    @Override
    public void setNumberFormat(String numberFormat) {
        this.numberFormat = numberFormat;
    }

    @Override
    public String getColumnType() {
        return columnType;
    }

    @Override
    public void setColumnType(String value) {
        this.columnType = value;
    }

    public String getComponentType() {
        return componentType;
    }

    public void setComponentType(String componentType) {
        this.componentType = componentType;
    }

    public boolean isEditable() {
        return editable;
    }

    public void setEditable(boolean editable) {
        this.editable = editable;
    }

    public String getImageName() {
        return imageName;
    }

    public void setImageName(String imageName) {
        this.imageName = imageName;
    }

    public String getImageUrlPrefix() {
        return imageUrlPrefix;
    }

    public void setImageUrlPrefix(String imageUrlPrefix) {
        this.imageUrlPrefix = imageUrlPrefix;
    }

    public String getDefaultImageLoadMode() {
        return defaultImageLoadMode;
    }

    public void setDefaultImageLoadMode(String defaultImageLoadMode) {
        this.defaultImageLoadMode = defaultImageLoadMode;
    }

    public String getLinkedDataSetColIDs() {
        return linkedDataSetColIDs;
    }

    public void setLinkedDataSetColIDs(String linkedDataSetColIDs) {
        this.linkedDataSetColIDs = linkedDataSetColIDs;
    }

    public int getDegree() {
        return degree;
    }

    public void setDegree(int degree) {
        this.degree = degree;
    }


    @Override
    public String getFkeyID() {
        return null;
    }

    @Override
    public void setFkeyID(String fkey) {

    }

    @Override
    public String getRlglID() {
        return null;
    }

    @Override
    public void setRlglID(String rlglID) {

    }

    @Override
    public void dataChanged(EFDataSet ds) {

    }

    public String getInitEditMask() {
        return initEditMask;
    }

    public void setInitEditMask(String initEditMask) {
        this.initEditMask = initEditMask;
    }
}
